<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <!-- <script src="./lib/Promise.js"></script> -->
  <script src="./lib/Promise_class.js"></script>
  <script>
    const p0 = Promise.resolveDelay(2, 200)
    const p1 = Promise.resolve(3)
    const p2 = Promise.resolve(Promise.resolve(4))
    const p3 = Promise.resolve(Promise.reject(5))
    const p4 = Promise.reject(6)
    const p6 = Promise.rejectDelay(7, 2000)

    // p1.then(value => console.log('p1 value', value))
    // p2.then(value => console.log('p2 value', value))
    // p3.catch(reason => console.log('p3 reason', reason))
    // p4.catch(reason => console.log('p4 reason', reason))

  // const p5 = Promise.race([p0, p1, p4])
  const p5 = Promise.all([p6, p1])
  p5.then(
    value => console.log('p5 value', value),
    reason => console.log('p5 reason', reason)
  )
  </script>
</body>
</html>